package cn.pzhuWEB.llk.service.impl;

import cn.pzhuWEB.llk.dao.IStudentDao;
import cn.pzhuWEB.llk.entity.User;
import cn.pzhuWEB.llk.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

/**
 * 测试类--测试CRUD
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    @Qualifier("IStudentDao")
    private IStudentDao userDao;


    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public void register(User user) {
        userDao.register(user);
    }


    @Override
    public String queryCompTimeFour(User user) {
        return userDao.queryCompTimeFour(user);
    }

    @Override
    public String queryCompTimeSix(User user) {
        return userDao.queryCompTimeSix(user);
    }


    @Override
    public void insetGradeFour(User user) {
        userDao.insetGradeFour(user);
    }

    @Override
    public void updateUserGradeFour(User user) {
        userDao.updateUserGradeFour(user);
    }

    @Override
    public void updateUserGradeSix(User user) {
        userDao.updateUserGradeSix(user);
    }

    @Override
    public void insertGradeSix(User user) {
        userDao.insetGradeSix(user);
    }

    @Override
    public User findByStuCard(String stuCard) {
        return userDao.findByStuCard(stuCard);
    }

    @Override
    public User login(User user) {
        return userDao.login(user);
    }

    @Override
    public Integer findGradeFourByTimeRanking(User user) {
        return userDao.findGradeFourByTimeRanking(user);
    }

    @Override
    public Integer findGradeSixByTimeRanking(User user) {
        return userDao.findGradeSixByTimeRanking(user);
    }

    @Override
    public List<User> findFourRank() {
        return userDao.findFourRank();
    }

    @Override
    public List<User> findSixRank() {
        return userDao.findSixRank();
    }

    @Override
    public void insertFourRank(User user) {
        userDao.insertFourRank(user);
    }

    @Override
    public void insertSixRank(User user) {
        userDao.insertSixRank(user);
    }


}
